<!DOCTYPE html>
<html lang="en">
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
    <meta charset="utf-8"/>
    <title>    TFC-Trotri Foundation Classes &raquo; \tfc\saf\UpProxy
</title>
    <meta name="author" content=""/>
    <meta name="description" content=""/>

            <link href="../css/template.css" rel="stylesheet" media="all"/>
    
            <!--[if lt IE 9]>
        
        <![endif]-->
        <script src="../js/jquery-1.7.1.min.js" type="text/javascript"></script>
        <script src="../js/jquery-ui-1.8.2.custom.min.js" type="text/javascript"></script>
        <script src="../js/jquery.mousewheel.min.js" type="text/javascript"></script>
        <script src="../js/bootstrap.js" type="text/javascript"></script>
        <script src="../js/template.js" type="text/javascript"></script>
        <script src="../js/prettify/prettify.min.js" type="text/javascript"></script>
    
            <link rel="shortcut icon" href="../img/favicon.ico"/>
        <link rel="apple-touch-icon" href="../img/apple-touch-icon.png"/>
        <link rel="apple-touch-icon" sizes="72x72" href="../img/apple-touch-icon-72x72.png"/>
        <link rel="apple-touch-icon" sizes="114x114" href="../img/apple-touch-icon-114x114.png"/>
    </head>
<body>

        <div class="navbar navbar-fixed-top">
        <div class="navbar-inner">
            <div class="container">
                <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
                    <span class="icon-bar"></span> <span class="icon-bar"></span>
                    <span class="icon-bar"></span> </a>
                <a class="brand" href="http://www.trotri.com/">Trotri官网</a><a class="brand" href="../index.html">TFC-Trotri Foundation Classes</a>

                <div class="nav-collapse">
                    <ul class="nav">
                        <li class="dropdown">
                            <a href="#api" class="dropdown-toggle" data-toggle="dropdown">
                                API Documentation <b class="caret"></b>
                            </a>
                            <ul class="dropdown-menu">
                                                                    <li><a>Namespaces</a></li>
                                                                        <li><a href="../namespaces/tfc.html">tfc</a></li>
                                                                                                                                </ul>
                        </li>
                        <li class="dropdown" id="charts-menu">
                            <a href="#charts" class="dropdown-toggle" data-toggle="dropdown">
                                Charts <b class="caret"></b>
                            </a>
                            <ul class="dropdown-menu">
                                <li>
                                    <a href="../graph_class.html">
                                        <i class="icon-list-alt"></i>&#160;Class hierarchy diagram
                                    </a>
                                </li>
                            </ul>
                        </li>
                        <li class="dropdown" id="reports-menu">
                            <a href="#reports" class="dropdown-toggle" data-toggle="dropdown">
                                Reports <b class="caret"></b>
                            </a>
                            <ul class="dropdown-menu">
                                <li>
                                    <a href="../errors.html">
                                         
                                    </a>
                                </li>
                                <li>
                                    <a href="../markers.html">
                                        <i class="icon-list-alt"></i>&#160;Markers
                                    </a>
                                </li>
                                <li>
                                    <a href="../deprecated.html">
                                        <i class="icon-list-alt"></i>&#160;Deprecated
                                    </a>
                                </li>
                            </ul>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
        <div class="go_to_top">
            <a href="#___" style="color: inherit">Back to top&#160;&#160;<i class="icon-upload icon-white"></i></a>
        </div>
    </div>
    
    <div id="___" class="container">
        <noscript>
            <div class="alert alert-warning">
                Javascript is disabled; several features are only available if Javascript is enabled.
            </div>
        </noscript>

        
            <style>
        .deprecated h2 {
            text-decoration: line-through;
        }
    </style>
    <div class="row">
        <div class="span4">
                    <div class="btn-group view pull-right" data-toggle="buttons-radio">
        <button class="btn details" title="Show descriptions and method names"><i class="icon-list"></i></button>
        <button class="btn simple" title="Show only method names"><i class="icon-align-justify"></i></button>
    </div>
    <div class="btn-group visibility" data-toggle="buttons-checkbox">
        <button class="btn public active" title="Show public elements">Public</button>
        <button class="btn protected" title="Show protected elements">Protected</button>
        <button class="btn private" title="Show private elements">Private</button>
        <button class="btn inherited active" title="Show inherited elements">Inherited</button>
    </div>

        <ul class="side-nav nav nav-list">
        <li class="nav-header">
            <i class="icon-custom icon-method"></i> Methods
            <ul>
                                                                                                    <li class="method public">
        <a href="#method___construct" title="__construct :: 构造方法：初始化上传配置名">
            <span class="description">构造方法：初始化上传配置名</span><pre>__construct</pre>
        </a>
    </li>

                                                                                                        <li class="method public">
        <a href="#method_save" title="save :: 检查并上传文件">
            <span class="description">检查并上传文件</span><pre>save</pre>
        </a>
    </li>

                                                                                                        <li class="method public">
        <a href="#method_getUpload" title="getUpload :: 获取上传文件对象">
            <span class="description">获取上传文件对象</span><pre>getUpload</pre>
        </a>
    </li>

                                                                                                        <li class="method public">
        <a href="#method_getSavePath" title="getSavePath :: 上传完文件后的完整路径">
            <span class="description">上传完文件后的完整路径</span><pre>getSavePath</pre>
        </a>
    </li>

                                                                                                        <li class="method public">
        <a href="#method_getSaveDir" title="getSaveDir :: 获取上传文件保存目录">
            <span class="description">获取上传文件保存目录</span><pre>getSaveDir</pre>
        </a>
    </li>

                                                                                                        <li class="method public">
        <a href="#method_getMaxSize" title="getMaxSize :: 获取允许上传的文件大小最大值">
            <span class="description">获取允许上传的文件大小最大值</span><pre>getMaxSize</pre>
        </a>
    </li>

                                                                                                        <li class="method public">
        <a href="#method_getAllowTypes" title="getAllowTypes :: 获取所有允许上传的文件类型">
            <span class="description">获取所有允许上传的文件类型</span><pre>getAllowTypes</pre>
        </a>
    </li>

                                                                                                        <li class="method public">
        <a href="#method_getAllowExts" title="getAllowExts :: 获取所有允许上传的文件后缀">
            <span class="description">获取所有允许上传的文件后缀</span><pre>getAllowExts</pre>
        </a>
    </li>

                                                                                                        <li class="method public">
        <a href="#method_getAllowReplaceExists" title="getAllowReplaceExists :: 获取如果保存文件的地址已经存在其他文件，是否允许替换">
            <span class="description">获取如果保存文件的地址已经存在其他文件，是否允许替换</span><pre>getAllowReplaceExists</pre>
        </a>
    </li>

                                                                                                        <li class="method public">
        <a href="#method_getFileExt" title="getFileExt :: 通过文件名获取文件后缀，文件后缀已转化成小写字符">
            <span class="description">通过文件名获取文件后缀，文件后缀已转化成小写字符</span><pre>getFileExt</pre>
        </a>
    </li>

                                                                                                        <li class="method public">
        <a href="#method_getDirectory" title="getDirectory :: 获取上传文件保存目录">
            <span class="description">获取上传文件保存目录</span><pre>getDirectory</pre>
        </a>
    </li>

                                                                                                        <li class="method public">
        <a href="#method_getRootDir" title="getRootDir :: 获取上传文件保存根目录，如：DIR_DATA_UPLOAD . &#039;/imgs/thumb&#039;">
            <span class="description">获取上传文件保存根目录，如：DIR_DATA_UPLOAD . &#039;/imgs/thumb&#039;</span><pre>getRootDir</pre>
        </a>
    </li>

                                                                                                        <li class="method public">
        <a href="#method_getConfig" title="getConfig :: 获取上传配置信息">
            <span class="description">获取上传配置信息</span><pre>getConfig</pre>
        </a>
    </li>

                                                                                                        <li class="method public">
        <a href="#method_getClusterName" title="getClusterName :: 获取上传配置名">
            <span class="description">获取上传配置名</span><pre>getClusterName</pre>
        </a>
    </li>

                                                                                                        <li class="method public">
        <a href="#method_mkDir" title="mkDir :: 新建目录">
            <span class="description">新建目录</span><pre>mkDir</pre>
        </a>
    </li>

                                                </ul>
        </li>
        <li class="nav-header protected">» Protected
            <ul>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        </ul>
        </li>
        <li class="nav-header private">» Private
            <ul>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        </ul>
        </li>
        <li class="nav-header">
            <i class="icon-custom icon-constant"></i> Constants
            <ul>
                                <li class="constant ">
                    <a href="#constant_CONFIG_NAME" title="CONFIG_NAME :: ">
                        <span class="description"></span><pre>CONFIG_NAME</pre>
                    </a>
                </li>
                                <li class="constant ">
                    <a href="#constant_SUCCESS_NUM" title="SUCCESS_NUM :: ">
                        <span class="description"></span><pre>SUCCESS_NUM</pre>
                    </a>
                </li>
                                <li class="constant ">
                    <a href="#constant_ERROR_REQUEST" title="ERROR_REQUEST :: ">
                        <span class="description"></span><pre>ERROR_REQUEST</pre>
                    </a>
                </li>
                                <li class="constant ">
                    <a href="#constant_ERR_ABOVE_MAX_SIZE" title="ERR_ABOVE_MAX_SIZE :: ">
                        <span class="description"></span><pre>ERR_ABOVE_MAX_SIZE</pre>
                    </a>
                </li>
                                <li class="constant ">
                    <a href="#constant_ERR_DISALLOW_TYPE" title="ERR_DISALLOW_TYPE :: ">
                        <span class="description"></span><pre>ERR_DISALLOW_TYPE</pre>
                    </a>
                </li>
                                <li class="constant ">
                    <a href="#constant_ERR_DISALLOW_EXT" title="ERR_DISALLOW_EXT :: ">
                        <span class="description"></span><pre>ERR_DISALLOW_EXT</pre>
                    </a>
                </li>
                                <li class="constant ">
                    <a href="#constant_ERR_FILE_ALREADY_EXISTS" title="ERR_FILE_ALREADY_EXISTS :: ">
                        <span class="description"></span><pre>ERR_FILE_ALREADY_EXISTS</pre>
                    </a>
                </li>
                                <li class="constant ">
                    <a href="#constant_ERR_DISALLOW_UPLOAD" title="ERR_DISALLOW_UPLOAD :: ">
                        <span class="description"></span><pre>ERR_DISALLOW_UPLOAD</pre>
                    </a>
                </li>
                                <li class="constant ">
                    <a href="#constant_ERR_MOVE_UPLOADED_FILE" title="ERR_MOVE_UPLOADED_FILE :: ">
                        <span class="description"></span><pre>ERR_MOVE_UPLOADED_FILE</pre>
                    </a>
                </li>
                                <li class="constant ">
                    <a href="#constant_ERR_UPLOADED_FAILED" title="ERR_UPLOADED_FAILED :: ">
                        <span class="description"></span><pre>ERR_UPLOADED_FAILED</pre>
                    </a>
                </li>
                            </ul>
        </li>
    </ul>


        </div>

        <div class="span8">
            <div class="element class">
                <h1>UpProxy</h1>
                <small style="display: block; text-align: right">
                                                        </small>
                <p class="short_description">UpProxy class file
上传代理操作类</p>
                <div class="details">
                    <div class="long_description">
                        <p>配置 /cfg/app/appname/main.php：</p>
<pre>
return array (
  'upload' => array(
    'posts' => array(
      'directory' => 'imgs/thumb', // 上传目录名，在根目录：DIR_DATA_UPLOAD下，如：DIR_DATA_UPLOAD . '/imgs/thumb'
      'name_pre' => '',
      'name_rule' => 0, // 保存文件时的命名规则，0：原文件名、1：随机整数格式、2：随机字符串格式、3：日期和时间格式、4：日期和时间+随机整数格式、5：日期和时间+随机字符串格式、6：时间戳格式、7：时间戳+随机整数格式、8：时间戳+随机字符串格式
      'dir_rule' => 'Ym/d', // 目录名规则，由日期时间组成，如：DIR_DATA_UPLOAD . '/imgs/thumb/201410/04'
      'max_size' => 2097152, // 允许上传的文件大小最大值，单位：字节
      'allow_types' => array(
        'image/pjpeg',
        'image/jpeg',
        'image/gif',
        'image/png',
        'image/xpng',
        'image/wbmp',
        'image/bmp',
        'image/x-png'
      ),
      'allow_exts' => 'jpg|gif|png|bmp|zip|rar',
      'allow_replace_exists' => false, // 如果保存文件的地址已经存在其他文件，是否允许替换
      'dt_format' => 'YmdHis',
      'join_str' => '_',
      'rand_min' => 10000,
      'rand_max' => 99999,
      'rand_strlen' => 16 // 8 ~ 32之间
    ),
    'sysbatch' => array(
      ...
    ),
  ),
)
</pre>
                    </div>
                    <table class="table table-bordered">
                                                                                    <tr>
                                    <th>
                                        author
                                                                            </th>
                                    <td>
                                                                                    
                                                                                <p>宋欢 <a href="mailto:trotri@yeah.net">trotri@yeah.net</a></p>
                                    </td>
                                </tr>
                                                                                                                <tr>
                                    <th>
                                        version
                                                                            </th>
                                    <td>
                                                                                    
                                                                                <p>$Id: UpProxy.php 1 2013-04-05 01:38:06Z huan.song $</p>
                                    </td>
                                </tr>
                                                                                                                <tr>
                                    <th>
                                        package
                                                                            </th>
                                    <td>
                                                                                    
                                                                                <p>tfc.saf</p>
                                    </td>
                                </tr>
                                                                                                                <tr>
                                    <th>
                                        since
                                                                            </th>
                                    <td>
                                                                                    1.0
                                                                                
                                    </td>
                                </tr>
                                                                                                                                                                                                                                    </table>

                    <h3><i class="icon-custom icon-method"></i> Methods</h3>
                                                                <a id="method___construct"></a>
                        <div class="element clickable method public  method___construct" data-toggle="collapse" data-target=".method___construct .collapse">
                            <h2>构造方法：初始化上传配置名</h2>
                            <pre>__construct(string $clusterName) </pre>
                            <div class="labels">
                                                                                                                                                                                            </div>
                            <div class="row collapse">
                                <div class="detail-description">
                                    <div class="long_description"></div>

                                    <table class="table">
                                                                                    <tr>
                                                <th>
                                                    
                                                </th>
                                                <td>
                                                                                                    </td>
                                            </tr>
                                                                                    <tr>
                                                <th>
                                                    
                                                </th>
                                                <td>
                                                                                                    </td>
                                            </tr>
                                                                            </table>

                                                                            <h3>Arguments</h3>
                                                                                    <div class="subelement argument">
                                                <h4>$clusterName</h4>
                                                <code>string</code><p></p>
                                            </div>
                                                                            
                                                                    </div>
                            </div>
                        </div>
                                            <a id="method_save"></a>
                        <div class="element clickable method public  method_save" data-toggle="collapse" data-target=".method_save .collapse">
                            <h2>检查并上传文件</h2>
                            <pre>save(array $files) : integer</pre>
                            <div class="labels">
                                                                                                                                                                                            </div>
                            <div class="row collapse">
                                <div class="detail-description">
                                    <div class="long_description"></div>

                                    <table class="table">
                                                                                    <tr>
                                                <th>
                                                    
                                                </th>
                                                <td>
                                                                                                    </td>
                                            </tr>
                                                                            </table>

                                                                            <h3>Arguments</h3>
                                                                                    <div class="subelement argument">
                                                <h4>$files</h4>
                                                <code>array</code><p></p>
                                            </div>
                                                                            
                                                                            <h3>Response</h3>
                                        <code>integer</code><p></p>
                                                                    </div>
                            </div>
                        </div>
                                            <a id="method_getUpload"></a>
                        <div class="element clickable method public  method_getUpload" data-toggle="collapse" data-target=".method_getUpload .collapse">
                            <h2>获取上传文件对象</h2>
                            <pre>getUpload() : \tfc\util\Upload</pre>
                            <div class="labels">
                                                                                                                                                                                            </div>
                            <div class="row collapse">
                                <div class="detail-description">
                                    <div class="long_description"></div>

                                    <table class="table">
                                                                                    <tr>
                                                <th>
                                                    
                                                </th>
                                                <td>
                                                                                                    </td>
                                            </tr>
                                                                                    <tr>
                                                <th>
                                                    
                                                </th>
                                                <td>
                                                                                                    </td>
                                            </tr>
                                                                            </table>

                                    
                                                                            <h3>Response</h3>
                                        <code><a href="../classes/tfc.util.Upload.html">\tfc\util\Upload</a></code><p></p>
                                                                    </div>
                            </div>
                        </div>
                                            <a id="method_getSavePath"></a>
                        <div class="element clickable method public  method_getSavePath" data-toggle="collapse" data-target=".method_getSavePath .collapse">
                            <h2>上传完文件后的完整路径</h2>
                            <pre>getSavePath() : string</pre>
                            <div class="labels">
                                                                                                                                                                                            </div>
                            <div class="row collapse">
                                <div class="detail-description">
                                    <div class="long_description"></div>

                                    <table class="table">
                                                                                    <tr>
                                                <th>
                                                    
                                                </th>
                                                <td>
                                                                                                    </td>
                                            </tr>
                                                                                    <tr>
                                                <th>
                                                    
                                                </th>
                                                <td>
                                                                                                    </td>
                                            </tr>
                                                                            </table>

                                    
                                                                            <h3>Response</h3>
                                        <code>string</code><p></p>
                                                                    </div>
                            </div>
                        </div>
                                            <a id="method_getSaveDir"></a>
                        <div class="element clickable method public  method_getSaveDir" data-toggle="collapse" data-target=".method_getSaveDir .collapse">
                            <h2>获取上传文件保存目录</h2>
                            <pre>getSaveDir() : string</pre>
                            <div class="labels">
                                                                                                                                                                                            </div>
                            <div class="row collapse">
                                <div class="detail-description">
                                    <div class="long_description"></div>

                                    <table class="table">
                                                                                    <tr>
                                                <th>
                                                    
                                                </th>
                                                <td>
                                                                                                    </td>
                                            </tr>
                                                                                    <tr>
                                                <th>
                                                    
                                                </th>
                                                <td>
                                                                                                    </td>
                                            </tr>
                                                                            </table>

                                    
                                                                            <h3>Response</h3>
                                        <code>string</code><p></p>
                                                                    </div>
                            </div>
                        </div>
                                            <a id="method_getMaxSize"></a>
                        <div class="element clickable method public  method_getMaxSize" data-toggle="collapse" data-target=".method_getMaxSize .collapse">
                            <h2>获取允许上传的文件大小最大值</h2>
                            <pre>getMaxSize() : integer</pre>
                            <div class="labels">
                                                                                                                                                                                            </div>
                            <div class="row collapse">
                                <div class="detail-description">
                                    <div class="long_description"></div>

                                    <table class="table">
                                                                                    <tr>
                                                <th>
                                                    
                                                </th>
                                                <td>
                                                                                                    </td>
                                            </tr>
                                                                                    <tr>
                                                <th>
                                                    
                                                </th>
                                                <td>
                                                                                                    </td>
                                            </tr>
                                                                            </table>

                                    
                                                                            <h3>Response</h3>
                                        <code>integer</code><p></p>
                                                                    </div>
                            </div>
                        </div>
                                            <a id="method_getAllowTypes"></a>
                        <div class="element clickable method public  method_getAllowTypes" data-toggle="collapse" data-target=".method_getAllowTypes .collapse">
                            <h2>获取所有允许上传的文件类型</h2>
                            <pre>getAllowTypes() : array</pre>
                            <div class="labels">
                                                                                                                                                                                            </div>
                            <div class="row collapse">
                                <div class="detail-description">
                                    <div class="long_description"></div>

                                    <table class="table">
                                                                                    <tr>
                                                <th>
                                                    
                                                </th>
                                                <td>
                                                                                                    </td>
                                            </tr>
                                                                                    <tr>
                                                <th>
                                                    
                                                </th>
                                                <td>
                                                                                                    </td>
                                            </tr>
                                                                            </table>

                                    
                                                                            <h3>Response</h3>
                                        <code>array</code><p></p>
                                                                    </div>
                            </div>
                        </div>
                                            <a id="method_getAllowExts"></a>
                        <div class="element clickable method public  method_getAllowExts" data-toggle="collapse" data-target=".method_getAllowExts .collapse">
                            <h2>获取所有允许上传的文件后缀</h2>
                            <pre>getAllowExts() : array</pre>
                            <div class="labels">
                                                                                                                                                                                            </div>
                            <div class="row collapse">
                                <div class="detail-description">
                                    <div class="long_description"></div>

                                    <table class="table">
                                                                                    <tr>
                                                <th>
                                                    
                                                </th>
                                                <td>
                                                                                                    </td>
                                            </tr>
                                                                                    <tr>
                                                <th>
                                                    
                                                </th>
                                                <td>
                                                                                                    </td>
                                            </tr>
                                                                            </table>

                                    
                                                                            <h3>Response</h3>
                                        <code>array</code><p></p>
                                                                    </div>
                            </div>
                        </div>
                                            <a id="method_getAllowReplaceExists"></a>
                        <div class="element clickable method public  method_getAllowReplaceExists" data-toggle="collapse" data-target=".method_getAllowReplaceExists .collapse">
                            <h2>获取如果保存文件的地址已经存在其他文件，是否允许替换</h2>
                            <pre>getAllowReplaceExists() : boolean</pre>
                            <div class="labels">
                                                                                                                                                                                            </div>
                            <div class="row collapse">
                                <div class="detail-description">
                                    <div class="long_description"></div>

                                    <table class="table">
                                                                                    <tr>
                                                <th>
                                                    
                                                </th>
                                                <td>
                                                                                                    </td>
                                            </tr>
                                                                                    <tr>
                                                <th>
                                                    
                                                </th>
                                                <td>
                                                                                                    </td>
                                            </tr>
                                                                            </table>

                                    
                                                                            <h3>Response</h3>
                                        <code>boolean</code><p></p>
                                                                    </div>
                            </div>
                        </div>
                                            <a id="method_getFileExt"></a>
                        <div class="element clickable method public  method_getFileExt" data-toggle="collapse" data-target=".method_getFileExt .collapse">
                            <h2>通过文件名获取文件后缀，文件后缀已转化成小写字符</h2>
                            <pre>getFileExt(string $fileName) : string</pre>
                            <div class="labels">
                                                                                                                                                                                            </div>
                            <div class="row collapse">
                                <div class="detail-description">
                                    <div class="long_description"></div>

                                    <table class="table">
                                                                                    <tr>
                                                <th>
                                                    
                                                </th>
                                                <td>
                                                                                                    </td>
                                            </tr>
                                                                            </table>

                                                                            <h3>Arguments</h3>
                                                                                    <div class="subelement argument">
                                                <h4>$fileName</h4>
                                                <code>string</code><p></p>
                                            </div>
                                                                            
                                                                            <h3>Response</h3>
                                        <code>string</code><p></p>
                                                                    </div>
                            </div>
                        </div>
                                            <a id="method_getDirectory"></a>
                        <div class="element clickable method public  method_getDirectory" data-toggle="collapse" data-target=".method_getDirectory .collapse">
                            <h2>获取上传文件保存目录</h2>
                            <pre>getDirectory() : string</pre>
                            <div class="labels">
                                                                                                                                                                                            </div>
                            <div class="row collapse">
                                <div class="detail-description">
                                    <div class="long_description"></div>

                                    <table class="table">
                                                                                    <tr>
                                                <th>
                                                    
                                                </th>
                                                <td>
                                                                                                    </td>
                                            </tr>
                                                                                    <tr>
                                                <th>
                                                    
                                                </th>
                                                <td>
                                                                                                    </td>
                                            </tr>
                                                                            </table>

                                    
                                                                            <h3>Response</h3>
                                        <code>string</code><p></p>
                                                                    </div>
                            </div>
                        </div>
                                            <a id="method_getRootDir"></a>
                        <div class="element clickable method public  method_getRootDir" data-toggle="collapse" data-target=".method_getRootDir .collapse">
                            <h2>获取上传文件保存根目录，如：DIR_DATA_UPLOAD . &#039;/imgs/thumb&#039;</h2>
                            <pre>getRootDir() : string</pre>
                            <div class="labels">
                                                                                                                                                                                            </div>
                            <div class="row collapse">
                                <div class="detail-description">
                                    <div class="long_description"></div>

                                    <table class="table">
                                                                                    <tr>
                                                <th>
                                                    
                                                </th>
                                                <td>
                                                                                                    </td>
                                            </tr>
                                                                                    <tr>
                                                <th>
                                                    
                                                </th>
                                                <td>
                                                                                                    </td>
                                            </tr>
                                                                            </table>

                                    
                                                                            <h3>Response</h3>
                                        <code>string</code><p></p>
                                                                    </div>
                            </div>
                        </div>
                                            <a id="method_getConfig"></a>
                        <div class="element clickable method public  method_getConfig" data-toggle="collapse" data-target=".method_getConfig .collapse">
                            <h2>获取上传配置信息</h2>
                            <pre>getConfig(mixed $key = null) : mixed</pre>
                            <div class="labels">
                                                                                                                                                                                            </div>
                            <div class="row collapse">
                                <div class="detail-description">
                                    <div class="long_description"></div>

                                    <table class="table">
                                                                                    <tr>
                                                <th>
                                                    
                                                </th>
                                                <td>
                                                                                                    </td>
                                            </tr>
                                                                            </table>

                                                                            <h3>Arguments</h3>
                                                                                    <div class="subelement argument">
                                                <h4>$key</h4>
                                                <code>mixed</code><p></p>
                                            </div>
                                                                            
                                                                            <h3>Response</h3>
                                        <code>mixed</code><p></p>
                                                                    </div>
                            </div>
                        </div>
                                            <a id="method_getClusterName"></a>
                        <div class="element clickable method public  method_getClusterName" data-toggle="collapse" data-target=".method_getClusterName .collapse">
                            <h2>获取上传配置名</h2>
                            <pre>getClusterName() : string</pre>
                            <div class="labels">
                                                                                                                                                                                            </div>
                            <div class="row collapse">
                                <div class="detail-description">
                                    <div class="long_description"></div>

                                    <table class="table">
                                                                                    <tr>
                                                <th>
                                                    
                                                </th>
                                                <td>
                                                                                                    </td>
                                            </tr>
                                                                                    <tr>
                                                <th>
                                                    
                                                </th>
                                                <td>
                                                                                                    </td>
                                            </tr>
                                                                            </table>

                                    
                                                                            <h3>Response</h3>
                                        <code>string</code><p></p>
                                                                    </div>
                            </div>
                        </div>
                                            <a id="method_mkDir"></a>
                        <div class="element clickable method public  method_mkDir" data-toggle="collapse" data-target=".method_mkDir .collapse">
                            <h2>新建目录</h2>
                            <pre>mkDir(string $directory) : \tfc\saf\UpProxy</pre>
                            <div class="labels">
                                                                                                                                                                                            </div>
                            <div class="row collapse">
                                <div class="detail-description">
                                    <div class="long_description"></div>

                                    <table class="table">
                                                                                    <tr>
                                                <th>
                                                    throws
                                                </th>
                                                <td>
                                                                                                                                                                        
                                                                                                                                                                        <p>如果保存上传文件的目录不存在，抛出异常</p>
                                                                                                                                                                        
                                                                                                                                                                        <p>如果保存上传文件的目录没有可写权限，抛出异常</p>
                                                                                                    </td>
                                            </tr>
                                                                                    <tr>
                                                <th>
                                                    
                                                </th>
                                                <td>
                                                                                                    </td>
                                            </tr>
                                                                            </table>

                                                                            <h3>Arguments</h3>
                                                                                    <div class="subelement argument">
                                                <h4>$directory</h4>
                                                <code>string</code><p></p>
                                            </div>
                                                                            
                                                                            <h3>Response</h3>
                                        <code><a href="../classes/tfc.saf.UpProxy.html">\tfc\saf\UpProxy</a></code><p></p>
                                                                    </div>
                            </div>
                        </div>
                    
                                            <h3><i class="icon-custom icon-constant"></i> Constants</h3>
                                                    <a id="constant_CONFIG_NAME"> </a>
                            <div class="element clickable constant  constant_CONFIG_NAME" data-toggle="collapse" data-target=".constant_CONFIG_NAME .collapse">
                                <h2>CONFIG_NAME</h2>
                                <pre>CONFIG_NAME</pre>
                                <div class="labels">
                                                                    </div>
                                <div class="row collapse">
                                    <div class="detail-description">
                                        <div class="long_description"></div>
                                        <table class="table">
                                                                                            <tr>
                                                    <th>
                                                        var
                                                    </th>
                                                    <td>
                                                                                                                    <p>配置名</p>
                                                                                                            </td>
                                                </tr>
                                                                                            <tr>
                                                    <th>
                                                        
                                                    </th>
                                                    <td>
                                                                                                            </td>
                                                </tr>
                                                                                    </table>
                                    </div>
                                </div>
                            </div>
                                                    <a id="constant_SUCCESS_NUM"> </a>
                            <div class="element clickable constant  constant_SUCCESS_NUM" data-toggle="collapse" data-target=".constant_SUCCESS_NUM .collapse">
                                <h2>SUCCESS_NUM</h2>
                                <pre>SUCCESS_NUM</pre>
                                <div class="labels">
                                                                    </div>
                                <div class="row collapse">
                                    <div class="detail-description">
                                        <div class="long_description"></div>
                                        <table class="table">
                                                                                            <tr>
                                                    <th>
                                                        var
                                                    </th>
                                                    <td>
                                                                                                                    <p>OK</p>
                                                                                                            </td>
                                                </tr>
                                                                                            <tr>
                                                    <th>
                                                        
                                                    </th>
                                                    <td>
                                                                                                            </td>
                                                </tr>
                                                                                    </table>
                                    </div>
                                </div>
                            </div>
                                                    <a id="constant_ERROR_REQUEST"> </a>
                            <div class="element clickable constant  constant_ERROR_REQUEST" data-toggle="collapse" data-target=".constant_ERROR_REQUEST .collapse">
                                <h2>ERROR_REQUEST</h2>
                                <pre>ERROR_REQUEST</pre>
                                <div class="labels">
                                                                    </div>
                                <div class="row collapse">
                                    <div class="detail-description">
                                        <div class="long_description"></div>
                                        <table class="table">
                                                                                            <tr>
                                                    <th>
                                                        var
                                                    </th>
                                                    <td>
                                                                                                                    <p>参数错误</p>
                                                                                                            </td>
                                                </tr>
                                                                                            <tr>
                                                    <th>
                                                        
                                                    </th>
                                                    <td>
                                                                                                            </td>
                                                </tr>
                                                                                    </table>
                                    </div>
                                </div>
                            </div>
                                                    <a id="constant_ERR_ABOVE_MAX_SIZE"> </a>
                            <div class="element clickable constant  constant_ERR_ABOVE_MAX_SIZE" data-toggle="collapse" data-target=".constant_ERR_ABOVE_MAX_SIZE .collapse">
                                <h2>ERR_ABOVE_MAX_SIZE</h2>
                                <pre>ERR_ABOVE_MAX_SIZE</pre>
                                <div class="labels">
                                                                    </div>
                                <div class="row collapse">
                                    <div class="detail-description">
                                        <div class="long_description"></div>
                                        <table class="table">
                                                                                            <tr>
                                                    <th>
                                                        var
                                                    </th>
                                                    <td>
                                                                                                                    <p>上传文件失败：文件大小超过最大限制</p>
                                                                                                            </td>
                                                </tr>
                                                                                            <tr>
                                                    <th>
                                                        
                                                    </th>
                                                    <td>
                                                                                                            </td>
                                                </tr>
                                                                                    </table>
                                    </div>
                                </div>
                            </div>
                                                    <a id="constant_ERR_DISALLOW_TYPE"> </a>
                            <div class="element clickable constant  constant_ERR_DISALLOW_TYPE" data-toggle="collapse" data-target=".constant_ERR_DISALLOW_TYPE .collapse">
                                <h2>ERR_DISALLOW_TYPE</h2>
                                <pre>ERR_DISALLOW_TYPE</pre>
                                <div class="labels">
                                                                    </div>
                                <div class="row collapse">
                                    <div class="detail-description">
                                        <div class="long_description"></div>
                                        <table class="table">
                                                                                            <tr>
                                                    <th>
                                                        var
                                                    </th>
                                                    <td>
                                                                                                                    <p>上传文件失败：文件类型不在可允许的范围内</p>
                                                                                                            </td>
                                                </tr>
                                                                                            <tr>
                                                    <th>
                                                        
                                                    </th>
                                                    <td>
                                                                                                            </td>
                                                </tr>
                                                                                    </table>
                                    </div>
                                </div>
                            </div>
                                                    <a id="constant_ERR_DISALLOW_EXT"> </a>
                            <div class="element clickable constant  constant_ERR_DISALLOW_EXT" data-toggle="collapse" data-target=".constant_ERR_DISALLOW_EXT .collapse">
                                <h2>ERR_DISALLOW_EXT</h2>
                                <pre>ERR_DISALLOW_EXT</pre>
                                <div class="labels">
                                                                    </div>
                                <div class="row collapse">
                                    <div class="detail-description">
                                        <div class="long_description"></div>
                                        <table class="table">
                                                                                            <tr>
                                                    <th>
                                                        var
                                                    </th>
                                                    <td>
                                                                                                                    <p>上传文件失败：文件后缀名不在可允许的范围内</p>
                                                                                                            </td>
                                                </tr>
                                                                                            <tr>
                                                    <th>
                                                        
                                                    </th>
                                                    <td>
                                                                                                            </td>
                                                </tr>
                                                                                    </table>
                                    </div>
                                </div>
                            </div>
                                                    <a id="constant_ERR_FILE_ALREADY_EXISTS"> </a>
                            <div class="element clickable constant  constant_ERR_FILE_ALREADY_EXISTS" data-toggle="collapse" data-target=".constant_ERR_FILE_ALREADY_EXISTS .collapse">
                                <h2>ERR_FILE_ALREADY_EXISTS</h2>
                                <pre>ERR_FILE_ALREADY_EXISTS</pre>
                                <div class="labels">
                                                                    </div>
                                <div class="row collapse">
                                    <div class="detail-description">
                                        <div class="long_description"></div>
                                        <table class="table">
                                                                                            <tr>
                                                    <th>
                                                        var
                                                    </th>
                                                    <td>
                                                                                                                    <p>上传文件失败：保存文件的地址已经存在其他文件，并且不允许替换</p>
                                                                                                            </td>
                                                </tr>
                                                                                            <tr>
                                                    <th>
                                                        
                                                    </th>
                                                    <td>
                                                                                                            </td>
                                                </tr>
                                                                                    </table>
                                    </div>
                                </div>
                            </div>
                                                    <a id="constant_ERR_DISALLOW_UPLOAD"> </a>
                            <div class="element clickable constant  constant_ERR_DISALLOW_UPLOAD" data-toggle="collapse" data-target=".constant_ERR_DISALLOW_UPLOAD .collapse">
                                <h2>ERR_DISALLOW_UPLOAD</h2>
                                <pre>ERR_DISALLOW_UPLOAD</pre>
                                <div class="labels">
                                                                    </div>
                                <div class="row collapse">
                                    <div class="detail-description">
                                        <div class="long_description"></div>
                                        <table class="table">
                                                                                            <tr>
                                                    <th>
                                                        var
                                                    </th>
                                                    <td>
                                                                                                                    <p>上传文件失败：有可能是攻击性质的上传</p>
                                                                                                            </td>
                                                </tr>
                                                                                            <tr>
                                                    <th>
                                                        
                                                    </th>
                                                    <td>
                                                                                                            </td>
                                                </tr>
                                                                                    </table>
                                    </div>
                                </div>
                            </div>
                                                    <a id="constant_ERR_MOVE_UPLOADED_FILE"> </a>
                            <div class="element clickable constant  constant_ERR_MOVE_UPLOADED_FILE" data-toggle="collapse" data-target=".constant_ERR_MOVE_UPLOADED_FILE .collapse">
                                <h2>ERR_MOVE_UPLOADED_FILE</h2>
                                <pre>ERR_MOVE_UPLOADED_FILE</pre>
                                <div class="labels">
                                                                    </div>
                                <div class="row collapse">
                                    <div class="detail-description">
                                        <div class="long_description"></div>
                                        <table class="table">
                                                                                            <tr>
                                                    <th>
                                                        var
                                                    </th>
                                                    <td>
                                                                                                                    <p>上传文件失败：将临时文件更新到指定目录失败</p>
                                                                                                            </td>
                                                </tr>
                                                                                            <tr>
                                                    <th>
                                                        
                                                    </th>
                                                    <td>
                                                                                                            </td>
                                                </tr>
                                                                                    </table>
                                    </div>
                                </div>
                            </div>
                                                    <a id="constant_ERR_UPLOADED_FAILED"> </a>
                            <div class="element clickable constant  constant_ERR_UPLOADED_FAILED" data-toggle="collapse" data-target=".constant_ERR_UPLOADED_FAILED .collapse">
                                <h2>ERR_UPLOADED_FAILED</h2>
                                <pre>ERR_UPLOADED_FAILED</pre>
                                <div class="labels">
                                                                    </div>
                                <div class="row collapse">
                                    <div class="detail-description">
                                        <div class="long_description"></div>
                                        <table class="table">
                                                                                            <tr>
                                                    <th>
                                                        var
                                                    </th>
                                                    <td>
                                                                                                                    <p>上传文件失败：未知原因</p>
                                                                                                            </td>
                                                </tr>
                                                                                            <tr>
                                                    <th>
                                                        
                                                    </th>
                                                    <td>
                                                                                                            </td>
                                                </tr>
                                                                                    </table>
                                    </div>
                                </div>
                            </div>
                                            
                                                                <h3><i class="icon-custom icon-property"></i> Properties</h3>
                                                    <a id="property__clusterName"> </a>
                            <div class="element clickable property  protected property__clusterName" data-toggle="collapse" data-target=".property__clusterName .collapse">
                                <h2>寄存上传配置名</h2>
                                <pre>_clusterName : string</pre>
                                <div class="labels">
                                                                                                        </div>
                                <div class="row collapse">
                                    <div class="detail-description">
                                        <div class="long_description"></div>

                                        <table class="table">
                                                                                            <tr>
                                                    <th>
                                                        var
                                                    </th>
                                                    <td>
                                                                                                                    <p>寄存上传配置名</p>
                                                                                                            </td>
                                                </tr>
                                                                                            <tr>
                                                    <th>
                                                        
                                                    </th>
                                                    <td>
                                                                                                            </td>
                                                </tr>
                                                                                    </table>

                                                                                    <h3>Type(s)</h3>
                                            <code>string</code>
                                                                            </div>
                                </div>
                            </div>
                                                    <a id="property__config"> </a>
                            <div class="element clickable property  protected property__config" data-toggle="collapse" data-target=".property__config .collapse">
                                <h2>寄存上传配置信息</h2>
                                <pre>_config : array</pre>
                                <div class="labels">
                                                                                                        </div>
                                <div class="row collapse">
                                    <div class="detail-description">
                                        <div class="long_description"></div>

                                        <table class="table">
                                                                                            <tr>
                                                    <th>
                                                        var
                                                    </th>
                                                    <td>
                                                                                                                    <p>寄存上传配置信息</p>
                                                                                                            </td>
                                                </tr>
                                                                                            <tr>
                                                    <th>
                                                        
                                                    </th>
                                                    <td>
                                                                                                            </td>
                                                </tr>
                                                                                    </table>

                                                                                    <h3>Type(s)</h3>
                                            <code>array</code>
                                                                            </div>
                                </div>
                            </div>
                                                    <a id="property__upload"> </a>
                            <div class="element clickable property  protected property__upload" data-toggle="collapse" data-target=".property__upload .collapse">
                                <h2>of tfc\util\Upload</h2>
                                <pre>_upload : \tfc\saf\instance</pre>
                                <div class="labels">
                                                                                                        </div>
                                <div class="row collapse">
                                    <div class="detail-description">
                                        <div class="long_description"></div>

                                        <table class="table">
                                                                                            <tr>
                                                    <th>
                                                        var
                                                    </th>
                                                    <td>
                                                                                                                    <p>of tfc\util\Upload</p>
                                                                                                            </td>
                                                </tr>
                                                                                            <tr>
                                                    <th>
                                                        
                                                    </th>
                                                    <td>
                                                                                                            </td>
                                                </tr>
                                                                                    </table>

                                                                                    <h3>Type(s)</h3>
                                            <code>\tfc\saf\instance</code>
                                                                            </div>
                                </div>
                            </div>
                                                    <a id="property__savePath"> </a>
                            <div class="element clickable property  protected property__savePath" data-toggle="collapse" data-target=".property__savePath .collapse">
                                <h2>上传完文件后的完整路径</h2>
                                <pre>_savePath : string</pre>
                                <div class="labels">
                                                                                                        </div>
                                <div class="row collapse">
                                    <div class="detail-description">
                                        <div class="long_description"></div>

                                        <table class="table">
                                                                                            <tr>
                                                    <th>
                                                        var
                                                    </th>
                                                    <td>
                                                                                                                    <p>上传完文件后的完整路径</p>
                                                                                                            </td>
                                                </tr>
                                                                                            <tr>
                                                    <th>
                                                        
                                                    </th>
                                                    <td>
                                                                                                            </td>
                                                </tr>
                                                                                    </table>

                                                                                    <h3>Type(s)</h3>
                                            <code>string</code>
                                                                            </div>
                                </div>
                            </div>
                                                            </div>
            </div>
            <a id="\tfc\saf\UpProxy"></a>
            <ul class="breadcrumb">
                <li><a href="../index.html"><i class="icon-custom icon-class"></i></a></li>
                    
    
    <li><span class="divider">\</span><a href="../namespaces/tfc.saf.html">saf</a></li>

                <li class="active"><span class="divider">\</span><a href="../classes/tfc.saf.UpProxy.html">UpProxy</a></li>
            </ul>
        </div>
    </div>

    </div>

        <footer class="span12">
            Template is built using <a href="http://twitter.github.com/bootstrap/">Twitter Bootstrap 2</a> and icons provided by
            <a href="http://glyphicons.com/">Glyphicons</a>.<br/>
            Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and<br/>
            generated on Sat, 27 Dec 2014 06:16:38 +0000.<br/>
    </footer>
    </body>
</html>
